package base.study.chapter9;

import java.util.Comparator;
import java.util.TreeSet;

/**
 * TODO(用一句话描述方法的主要功能)
 */
public class TreeSetTest {

    public static class Item {
        private String description;
        private int partNumber;

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public int getPartNumber() {
            return partNumber;
        }

        public void setPartNumber(int partNumber) {
            this.partNumber = partNumber;
        }
    }

    public static void main(String[] args) {
        TreeSet<Item> treeSet = new TreeSet<>(new ItemCompator());
        treeSet.add(new Item());

        System.out.println(treeSet);
    }


    public static class ItemCompator implements Comparator<Item>{

        @Override
        public int compare(Item o1, Item o2) {
            return 0;
        }
    }
}
